Optical spectrometers detect the intensity of light as a function of wavelength or frequency. Existing spectrometers are difficult and expensive to fabricate. Existing spectrometers are not readily integrated into microfluidic systems for cytometry.